<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>校园综合服务系统</title>
    <head>
        <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"></script>
        <script>
            $(document).ready(function(){
                var urlParams = new URLSearchParams(window.location.search);

                var course_code = urlParams.get('course_code');
                var student_user_id = urlParams.get('student_user_id');
                $.post("http://localhost/edu/student/selected-info", {student_user_id: student_user_id, course_code: course_code}, function(response) {
                    var rs = $.parseJSON(response)
                    if (rs.code != "00000") {
                        alert("查看课程数据失败")
                    }
                    console.log(rs);
                    $("div.container").append("<p>课程名称:         " + rs.data.course_name + "</p>")
                    $("div.container").append("<p>课程编号:         " + rs.data.course_code + "</p>")
                    $("div.container").append("<p>教师:            " + rs.data.teacher_realname + "</p>")
                    $("div.container").append("<p>学时数量:         " + rs.data.section_count + "</p>")
                    $("div.container").append("<p>当前所选人数:      " + rs.data.current_section_count + "</p>")
                    $("div.container").append("<p>上课时间:         " + rs.data.course_time + "</p>")
                    $("div.container").append("<p>课程介绍:         " + rs.data.course_profile + "</p>")
                    $("div.container").append("<p>教材:            " + rs.data.textbook + "</p>")
                    $("div.container").append("<p>学分:            " + rs.data.credits_count + "</p>")
                    $("div.container").append("<p>考核满分:         " + rs.data.all_score + "</p>")
                    $("div.container").append("<p>及格分数:         " + rs.data.pass_score + "</p>")
                    $("div.container").append("<p>我的分数:         " + rs.data.my_score + "</p>")
                    $("div.container").append("<p>是否合格:         " + rs.data.course_is_pass + "</p>")
                });
            });
        </script>
        </head>
    <style>
        .container {
            text-align: center;
        }
    </style>
</head>
<body>

    <a href="user_courses.html">我的课程</a><br>
    <a href="all_courses.html">选课</a><br>
    <a href="all_blogs.html">校园论坛</a><br>
    <a href="change_pwd.html">修改密码</a><br>
    <a href="teacher_schedule.html">教师课表</a><br>
    <a href="student_schedule.html">学生课表</a><br>
    <div class="container">    
        
    </div>
    


</body>
</html>